ngl: Do nothing for transparent text nodes
authorMatthias Clasen <mclasen@redhat.com>
Thu, 15 Jul 2021 17:17:17 +0000 (13:17 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 15 Jul 2021 17:18:23 +0000 (13:18 -0400)
Like the previous commit - a transparent text node
will not produce any visible pixels, so bail out early.

gsk/ngl/gsknglrenderjob.c

index 8785766612f2fbb35581fbaa67676e12b23d84eb..3f36d506ab5cf74847d189481dff0ce0eb24ee93 100644 (file)
@@ -2850,7 +2850,12 @@ gsk_ngl_render_job_visit_text_node (GskNglRenderJob     *job,
    * We tell the shader by setting the color to vec4(-1).
    */
   if (force_color || !gsk_text_node_has_color_glyphs (node))
-    rgba_to_half (color, c);
+    {
+      if (gdk_rgba_is_clear (color))
+        return;
+
+      rgba_to_half (color, c);
+    }
 
   lookup.font = (PangoFont *)font;
   lookup.scale = (guint) (text_scale * 1024);